<template>
    <div>
        <table class="table">
            <thead>
                <tr>
                    <td>会员编号</td>
                    <td>会员名称</td>
                    <td>年龄</td>
                    <td>性别</td>
                    <td>状态</td>
                    <td>出生日期</td>
                    <td>创建时间</td>
                </tr>
            </thead>
            <tbody>
                 <tr v-for="a in datalist" :key="a.T_Activeid">
                    <td>{{a.T_Activeid}}</td>
                    <td>{{a.T_Activename}}</td>
                    <td>{{a.T_Activeage}}</td>
                    <td>{{a.T_Activesex}}</td>
                    <td>{{a.T_Activestate}}</td>
                    <td>{{a.T_Activedate.substr(0,10)}}</td>
                    <td>{{a.DateTimeAc.substr(0,10)}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';
onMounted(()=>{
    getlist();
});
const datalist=ref([
     {
    "T_Activeid": 0,
    "T_Activename": "string",
    "T_Activeage": 0,
    "T_Activesex": "string",
    "T_Activestate": true,
    "T_Activedate": "2025-07-18T11:40:52.063Z",
    "DateTimeAc": "2025-07-18T11:40:52.063Z"
  }
]);

const getlist=()=>{

    axios.get("https://localhost:44341/api/User/ShowActive").then((res)=>{

      datalist.value=res.data;
    });

};

    


</script>

<style scoped>

</style>